package com.travel.admin.enums;

public enum FlightStateEnum {
	CANCEL("00","取消"),
	INIT("01","初始化"),
	SUBMIT("02","已提交"),
	PROVE("03","论证中"),
	PLAN("04","计划下发"),
	BOARDING("05","执行中"),
	COMPLETE("09","完成"),
	;
	private String code;
	private String name;
	private FlightStateEnum(String code, String name){
		this.code = code;
		this.name = name;
	}
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public static String getName(String code){
		for (FlightStateEnum value : FlightStateEnum.values()) {
            if (value.getCode().equals(code)) {
                return value.name;
            }
        }
		return null;
	}
}
